datetime one month ago python

49

get month day year 12 hour time format python -

import time

# get current time
date_time = time.strftime("%b %d, %Y %-I%p")

#the above outputs: May 27, 2021 7PM

Comments

Submit
0 Comments